﻿using System;
using atm;

static void Atm_BigMoneyFetched(object sender, BigMoneyArgs e)
{
    Console.WriteLine($"告警: 账号 {e.Account.AccountNumber} 取走大笔金额 {e.Amount} 元");
}

Bank bank = new Bank("Test Bank");
ATM atm = new ATM("Downtown", bank);

atm.BigMoneyFetched += Atm_BigMoneyFetched;

Account account1 = new Account("Alice", "A001");
CreditAccount account2 = new CreditAccount("Bob", "C002", 5000);

account1.Deposit(20000);
account2.Deposit(10000);

atm.Withdraw(account1, 15000); 
atm.Withdraw(account2, 12000); 

atm.Withdraw(account1, 500);